<?php
/*  
  Copyright (c) 2010-02 SongCMS 
  SongCMS All Rights Reserved. 
  Support:www.SongCMS.com
  QQ:544255858   19951025
  Author:Song  Version:3.17
  Date:2010-08-12 09:28:32
*/
$product = new product();
$product -> Lang = $Lang;
$product -> Ltext = $Html['page'];
$SC -> register -> templateObject("product",$product);
$news = new news();
$news -> Lang = $Lang;
$news -> Ltext = $Html['page'];
$SC -> register -> templateObject("news",$news);
$article = new article();
$article -> Lang = $Lang;
$article -> Ltext = $Html['page'];
$SC -> register -> templateObject("article",$article);
$SC -> register -> templateObject("sdb",$sdb);
switch ($n = $news -> NewsDetail($sGET['i'])){
	case 0: die($Warning[10]); break;
	case 1: die($Warning[11]); break;
	case 2: die($Warning[12]); break;
}
$cv['ID'] = $n['ID']; 
$cv['type'] = 2;  
$cv['xtype'] = 'news'; 
$cv['Agree'] = $n['NewsAgree']; 
$cv['Disagree'] = $n['NewsDisagree']; 
$cv['AgreeTotal'] = $n['NewsAgree'] + $n['NewsDisagree']; 
$cv['AgreePercent'] = @round($n['NewsAgree']/$cv['AgreeTotal']*100,1); 
$cv['DisagreePercent'] = @round($n['NewsDisagree']/$cv['AgreeTotal']*100,1); 
$cv['AgreeWidth'] = @round($cv['AgreePercent'] * 142/100); 
$cv['DisagreeWidth'] = @round($cv['DisagreePercent'] * 142/100); 
$cv['CommentURL'] = $Lang == 1 ? "./?fcomment/t2/i{$n['ID']}" : "./?fcomment/l{$Lang}/t2/i{$n['ID']}"; 
$cv['CURL'] = $Lang == 1 ? "./?fcomment/t2/i{$n['ID']}" : "./?fcomment/l{$Lang}/t2/i{$n['ID']}"; 
$cv['CommentTotal'] = $sdb -> CommentTotal(2,$n['ID']); 
$SC -> assign('cv',$cv);
if(!empty($n['NewsKeyWord'])) $WebConfig['Webkeyword'] = $n['NewsKeyWord'];
$aparr['word'] = $n['NewsContent'];
$aparr['length'] = 200;
$aparr['illegal'] = 1;
$aparr['suffix'] = "";
$WebConfig['WebDescription'] = $sdb -> html2txt($aparr);
$SC -> assign('Web',$WebConfig);
$db = new db();
$n['Sort'] = ArticleName($n['NewsRela'],' >> ',1);
$SC->assign("n",$n);
unset($db,$n);
include_once($CodeList . 'top.php');
include_once($CodeList . 'bottom.php');
$SC -> display($TemFile,$GetUrlPar);
?>